import request from "../utils/request.js"

export function getBasis(data){
	return request({
		url: "/basis",
		method: "post",
		data
	})
}

export function jsonFile(words, type = 'draw'){
	return request({
		url: "https://file.web-jshtml.cn/times/cnchar-data/"+ type +"/"+ words +".json",
		method: "get",
		data: {},
		responseType: 'text'
	})
}

export function getFileJson(words, path = 'draw', suffix = '.json'){
	return request({
		url: "https://file.web-jshtml.cn/times/yuwen/"+ path +"/"+ words + suffix,
		method: "get",
		data: {}
	})
}